package io.noties.markwon.plugin.yaml

import io.noties.markwon.base.AbstractMarkwonPlugin
import org.commonmark.ext.front.matter.internal.YamlFrontMatterBlockParser
import org.commonmark.parser.Parser

class YamlFrontMatterPlugin: AbstractMarkwonPlugin() {

    override fun configureParser(builder: Parser.Builder) {
        builder.customBlockParserFactory(YamlFrontMatterBlockParser.Factory())
    }

    companion object{
        fun create():YamlFrontMatterPlugin=YamlFrontMatterPlugin()
    }
}